{% extends '../common/common.html' %}
{% block main %}
<div class="box-content">
    <div class="contents">

        <div class="contents-box">
            <div class="contents-title">{{ contents.title }}</div>
            <div class="contents-changes">
                <span>发布于:{{ contents.addTime|date('Y-m-d h:i:s',-8*60) }}</span>
                <span>作者:{{ contents.nickname }}</span>
                <span>{{ contents.views }}次浏览</span>
            </div>
        </div>

        <div class="contents-main">
            {% autoescape %}{{ contents.content }}{% endautoescape %}
        </div>
    </div>
    <div class="comments-main">
        {% if userInfo.id == '' %}
        <div class="comments-err">您还没有登录，登录了才能评论哟(＾Ｕ＾)ノ~ＹＯ</div>
        {% else %}
        <div class="comments-txt">
            <textarea placeholder="请输入内容..." class="comments-textarea" name="contents"></textarea>
            <input type="button" value="提交" id="comments-sub">
        </div>
        {% endif %}
        <input type="hidden" id="contentId" value="{{ contents.id }}">
        <div class="comments-tit">所有评论</div>
        <!--<div class="comments-err">暂时还没有评论，赶紧评论一个吧(#^.^#)</div>-->
        <div id="comments-ul"></div>
        <div id="more_review">滚动加载更多...</div>
    </div>
</div>
<script src="/public/js/contents.js"></script>
{% endblock %}